import request from '@/utils/request'

export function getList(data) {
 const params = new URLSearchParams(data).toString();
  return request({
    url:`/house/api/property/getList?${params}`,
    method: 'get',
  })
}

export function doEdit(data) {
  return request({
    url: '/house/api/property/add',
    method: 'post',
    data,
  })
}

export function doDelete(data) {
  return request({
    url: '/house/api/property/del',
    method: 'post',
    data,
  })
}


// 查询所有房东信息
export function getOwnerList(data) {
  return request({
    url: '/house/api/property/findOwnerList',
    method: 'get',
  })
}


// 查询所身份
export function getAllProvinces(data) {
  const params = new URLSearchParams(data).toString();
  return request({
    url: `/admin/api/address/getAllProvinces?${params}`,
    method: 'get',
  })
}


export function getCityByProId(data) {
  const params = new URLSearchParams(data).toString();
  return request({
    url: `/admin/api/address/getCityByProId?${params}`,
    method: 'get',
  })
}

export function getAreaByCityId(data) {
  const params = new URLSearchParams(data).toString();
  return request({
    url: `/admin/api/address/getAreaByCityId?${params}`,
    method: 'get',
  })
}


export function getStreets(data) {
  const params = new URLSearchParams(data).toString();
  return request({
    url: `/admin/api/address/getStreet?${params}`,
    method: 'get',
  })
}
